package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysComboMealMapper;
import com.ruoyi.system.domain.SysComboMeal;
import com.ruoyi.system.service.ISysComboMealService;

/**
 * 会员套餐配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-27
 */
@Service
public class SysComboMealServiceImpl implements ISysComboMealService 
{
    @Autowired
    private SysComboMealMapper sysComboMealMapper;

    /**
     * 查询会员套餐配置
     * 
     * @param id 会员套餐配置主键
     * @return 会员套餐配置
     */
    @Override
    public SysComboMeal selectSysComboMealById(String id)
    {
        return sysComboMealMapper.selectSysComboMealById(id);
    }

    /**
     * 查询会员套餐配置列表
     * 
     * @param sysComboMeal 会员套餐配置
     * @return 会员套餐配置
     */
    @Override
    public List<SysComboMeal> selectSysComboMealList(SysComboMeal sysComboMeal)
    {
        return sysComboMealMapper.selectSysComboMealList(sysComboMeal);
    }

    /**
     * 新增会员套餐配置
     * 
     * @param sysComboMeal 会员套餐配置
     * @return 结果
     */
    @Override
    public int insertSysComboMeal(SysComboMeal sysComboMeal)
    {
        sysComboMeal.setCreateTime(DateUtils.getNowDate());
        return sysComboMealMapper.insertSysComboMeal(sysComboMeal);
    }

    /**
     * 修改会员套餐配置
     * 
     * @param sysComboMeal 会员套餐配置
     * @return 结果
     */
    @Override
    public int updateSysComboMeal(SysComboMeal sysComboMeal)
    {
        sysComboMeal.setUpdateTime(DateUtils.getNowDate());
        return sysComboMealMapper.updateSysComboMeal(sysComboMeal);
    }

    /**
     * 批量删除会员套餐配置
     * 
     * @param ids 需要删除的会员套餐配置主键
     * @return 结果
     */
    @Override
    public int deleteSysComboMealByIds(String[] ids)
    {
        return sysComboMealMapper.deleteSysComboMealByIds(ids);
    }

    /**
     * 删除会员套餐配置信息
     * 
     * @param id 会员套餐配置主键
     * @return 结果
     */
    @Override
    public int deleteSysComboMealById(String id)
    {
        return sysComboMealMapper.deleteSysComboMealById(id);
    }
}
